#ifndef MAKER_BASE_H
#define MAKER_BASE_H
#define _GNU_SOURCE
#include "../common/utility.h"
#include <netinet/if_ether.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/if_tun.h>
#include <net/if.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#define DEBUG_PRINT(fmt, ...) printf("\033[32m[DEBUG]\033[0m " fmt "\n", ##__VA_ARGS__);
#define INFO_PRINT(fmt, ...) printf("\033[32m[INFO]\033[0m " fmt "\n", ##__VA_ARGS__);
#define ALLOC_PCK(pck_type)                    \
    ({                                         \
        int size_of_pck = sizeof(pck_type);    \
        pck_type *p_pck = malloc(size_of_pck); \
        if (!p_pck)                            \
        {                                      \
            perror(strerror(errno));           \
        }                                      \
        p_pck;                                 \
    })
struct arp_pck
{
    struct ether_header header;
    struct ether_arp arp;
    char fill_data[18];

} __attribute__((__packed__));
struct arp_pck arp_maker(uint8_t *sender_hardware_address, uint8_t *sender_protocol_address, uint8_t *target_hardware_address, uint8_t *target_protocol_address);
struct arp_pck arp_maker_with_fill_data(uint8_t *sender_hardware_address, uint8_t *sender_protocol_address, uint8_t *target_hardware_address, uint8_t *target_protocol_address,unsigned char * data);

#endif